﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Meqs.Logic.Interface;
using Meqs.Entity;
using System.Collections.Generic;

public partial class TeacherEval_School_ScoreInput_Left : System.Web.UI.Page
{
    protected string first = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected string GetMenu()
    { 
        SchoolInfo si = SchoolCommon.Sch_SchoolInfo;
        int schoolYear = si.SchoolYear;
        int term = si.SchoolTerm;
        string schoolMark = si.SchoolMark;

        ITeacherEvalHistoryLogic logic = Container<ITeacherEvalHistoryLogic>.Instance;

        Hashtable ht = new Hashtable();
        ht.Add("SchoolYear",schoolYear);
        ht.Add("Term", term);
        ht.Add("SchoolMark", si.SchoolMark);
        ht.Add("Site", TeacherEvalHistory.SystemSiteName);
        IList<TeacherEvalHistory> list = logic.FindAll(ht);
        string str = "<ul>";
        if (SchoolCommon.CheckRole((int)RoleKeyEnum.Teach_Director))
        {
            foreach (TeacherEvalHistory te in list)
            {
                if (te.Attribute >= 3 && te.KeyWord != TeacherEvalHistory.CauseStudentSurvey_Term_Eval)
                {
                    if (te.Status > 0)
                    {
                        str += "<dd><li id=" + te.RID + " onclick=\"Nav(" + te.RID + "," + te.Attribute + ",'" + te.KeyWord + "')\"><a onclick='' title='' ><span ><img style='padding-top:5px'  src='../../Common/images/thisone.png' />&nbsp;&nbsp;" + te.Caption + "</span></a></li></dd>";
                    }
                    else
                    {
                        str += "<dd><li id=" + te.RID + " onclick=\"Nav1(" + te.RID + ")\"><a onclick='' title='' ><span ><img style='padding-top:5px'  src='../../Common/images/thisone.png' />&nbsp;&nbsp;" + te.Caption + "</span></a></li></dd>";
                    }

                }
            }
        }
        str += "<dd><li id=\"detailLi\" style=\"display: none;\"><a href=\"#\"><span><img style='padding-top:5px'  src='../../Common/images/thisone.png' />&nbsp;&nbsp;教师结果录入</span></a></li></dd>";
        str += "</ul>";
        if (list.Count>0)
        {
            if (SchoolCommon.CheckRole((int)RoleKeyEnum.Teach_Director) && list[0].Status == 1)
            {
                first = "Nav(" + list[0].RID + "," + list[0].Attribute + ",'" + list[0].KeyWord + "');";
            }
            else
            { 
                first = "parent.frames[\"mainFrame\"].location.href = \"msgPage.html\"";
            }
        }
        return str;
    }
}
